home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 008 / signspc.bas (.txt) < prev    next >
Encoding:
GW-BASIC  |  1987-04-19  |  5.6 KB  |  101 lines

  1. 110  CLS:PRINT
  2. 120  PRINT"        SIGNS-PC     ":PRINT'40612
  3. 130  PRINT"        (c)Robert G. Gallie,1984":PRINT
  4. 140  PRINT"        A PROGRAM TO PRINTOUT LARGE-LETTER SIGNS AND BANNERS"
  5. 150  PRINT"        USING THE IBM-PC":PRINT
  6. 160  PRINT"        (For directions, list the program lines.)"
  7. 170  '
  8. 180  'This program allows easy display and printout of a sideways stream of
  9. 190  'oversize alphanumeric characters.  It can be used to create signs,
  10. 200  'banners, posters, displays, headlines, logos, and designs.  A graphics
  11. 210  'printer is NOT required.
  12. 220  '
  13. 230  'The size of the oversize characters depends on two numbers you give the
  14. 240  'program and on the character-size settings of your printer.  SIGNS-PC
  15. 250  'can printout character streams of any length at all, with characters
  16. 260  'of mixed sizes from less than a square inch to over twenty-five hundred
  17. 270  'square inches (if you can find the apporpriate printer and paper)!
  18. 280  '
  19. 290  'To use SIGNS-PC you need only answer a few questions about the output you
  20. 300  'want.  Consult the following if you need some explanation of the questions
  21. 310  '
  22. 320  '   THE WIDTH MULTIPLIER.  How many times the current printer-character
  23. 330  '   width should each oversize character's width be ?  8 is the least
  24. 340  '   width multiplier possible.  8, 16, and 24 are typical useful values.
  25. 350  '   If you enter a value which is not a multiple of 8, SIGNS-PC will use
  26. 360  '   the closest multiple of 8.
  27. 370  '
  28. 380  '   HEIGHT DISTORTION FACTOR.  A value of 1 here sets the height of the
  29. 390  '   oversize characters to keep the normal height-to-width ratio.  Shorter
  30. 400  '   characters are possible by using lower values, such as .5, .75, or
  31. 410  '   .875.  Taller characters are possible by using higher values, such as
  32. 420  '   1.125, 1.25, or 1.5.  The least effective increment or decrement is
  33. 430  '   .125.
  34. 440  '
  35. 450  '   BLANK SPACES BENEATH THE CHARACTERS.  To raise the oversize characters
  36. 460  '   from the bottom of the page, specify a number of lines here.  Each line
  37. 470  '   is as high as a printer-character is wide.  This is usually kept at
  38. 480  '   0.  Higher values, such as 30 or 60 may be useful in some cut-and-
  39. 490  '   paste operations, but the screen characters will distort due to 'line-
  40. 500  '   folding.'
  41. 510  '
  42. 520  '   THE CHARACTER(S) TO BE ADDED TO THE SIGN.  The complete set of regular
  43. 530  '   regular ASCII characters is available.  The spacing between characters
  44. 540  '   remains correct even though you may output a longer stream of char-
  45. 550  '   acters as many small groups of characters.
  46. 560  '
  47. 570  '   PRINTOUT TO PAPER.  Unless you specifically direct that output go onto
  48. 580  '   paper, it will only be displayed on the screen.  The ASCII CHARACTER
  49. 590  '   WHICH THE PRINTER IS TO USE AS A 'DOT' in constructing the oversize
  50. 600  '   characters can be  .  or  :  to conserve your ribbon (Paint or a felt
  51. 610  '   pen can be used later to color the characters) or  @  for full charac-
  52. 620  '   ers.
  53. 630  '
  54. 640  'Use one-character 'streams' when you first try the program, since output
  55. 650  'that you don't use will waste alot of paper.
  56. 660  '
  57. 670  'The patterns for the characters come from the standard ASCII set in the
  58. 680  'IBM-PC's ROM.  A 'mask' technique was used to turn them sideways for the
  59. 690  'best use of paper.
  60. 700  '
  61. 710  'We have a few OTHER PROGRAMS available for media-plus-handling costs.  For
  62. 720  'descriptions, send YOUR ADDRESS TO Bob Gallie; 4726 W. 13th Street; Chica-
  63. 730  'go 60650.
  64. 740  '
  65. 750  WIDTH "LPT1:",255: COLOR 7,0
  66. 760  DEFINT B,C,D,L:WM!=24:CWM=1:HDF!=1:CHM=2:BS=0
  67. 770  SC$="@" 'ASCII to use as 'dots' in the large characters on screen   @ 
  68. 780  PC$=":":PRINTOUT$="N" 'Printer uses  :
  69. 790  PRINT:PRINT
  70. 800  PRINT "KEY";STRING$(77,"THEN");"CLOSE"
  71. 810  WHILE INKEY$<>"":WEND:PRINT "OPEN Character width to be ## times normal (8,16,24,...).              ";WM!;:INPUT X$:IF X$<>"" THEN WM!=VAL(X$)
  72. 820  IF WM!<8 THEN PRINT "* The smallest sign character possible is 8 times normal width.":GOTO 810
  73. 830  CWM=WM!/8
  74. 840  PRINT "OPEN Height distortion factor (short...,.875,...,1,...,1.125,...tall).  ";HDF!;:INPUT X$:IF X$<>"" THEN HDF=VAL(X$)
  75. 850  CHM=CWM*2.778*HDF!
  76. 860  PRINT "OPEN Blank spaces beneath the characters (0,...,30,...).                ";BS;:INPUT X$:IF X$<>"" THEN BS=VAL(X$)
  77. 870  BEEP:PRINT"OPEN Now enter the character(s) to be added to the sign: ";:LINE INPUT WORD$
  78. 880  INPUT "OPEN Printout to paper (Y/N)                                             N ";PRINTOUT$
  79. 890  IF PRINTOUT$="Y" OR PRINTOUT$="y" THEN PRINT "OPEN What ASCII should the printer use to construct sign characters--","OPEN  ( @  fills well, but  :  conserves the ribbon).                    ";PC$;" ? ";:LINE INPUT X$:IF X$<>"" THEN PC$=X$
  80. 900  PRINT"OPEN":PRINT "OPEN Press <ENTER> to start.":PRINT"OPEN Press  /      to interrupt the process before the next character.";X$:PRINT"SCREEN";STRING$(77,"THEN");"LOAD":PRINT:PRINT
  81. 910  X$=INKEY$:IF X$<>CHR$(13) AND X$<>"/" THEN 910
  82. 920  DEF SEG=-4096                   ' ROM holds 128 ASCII @ 8 bytes from here
  83. 930  FOR CP=1 TO LEN(WORD$)          ' Position of this character
  84. 940    IF X$="/" THEN 1100            ' Test for interruption
  85. 950    FOR DC=7 TO 0 STEP-1          ' Dot column ('AND' below will mask 7 of 8)
  86. 960      FOR DPL=1 TO CWM            ' Duplicate printout lines add boldness
  87. 970        PRINT STRING$(BS," ");    ' Blank spaces below the characters
  88. 980        IF PRINTOUT$="Y" OR PRINTOUT$="y" THEN LPRINT STRING$(BS," ");'under
  89. 990        FOR DR=7 TO 0 STEP -1     ' dot row
  90. 1000          IF PEEK(-1426+(ASC(MID$(WORD$,CP,1)))*8+DR) AND 2^DC   THEN PRINT STRING$(CHM,SC$); ELSE 1030
  91. 1010          IF PRINTOUT$="Y" OR PRINTOUT$="y" THEN LPRINT STRING$(CHM,PC$);
  92. 1020          GOTO 1050
  93. 1030          PRINT STRING$(CHM," ");
  94. 1040          IF PRINTOUT$="Y" OR PRINTOUT$="y" THEN LPRINT STRING$(CHM," ");
  95. 1050        NEXT DR:PRINT
  96. 1060        IF PRINTOUT$="Y" OR PRINTOUT$="y" THEN LPRINT" "
  97. 1070      NEXT DPL
  98. 1080    NEXT DC:X$=INKEY$
  99. 1090  NEXT CP
  100. 1100  PRINT:PRINT "For the next character(s) ...  ":GOTO 800
  101.